<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <!-- 
            如果有多个插槽的使用想替换里面的值学要给每一个插槽name值
         -->
         <cpn><span slot="center">标题</span></cpn>
         <cpn><button slot="left">按钮</button></cpn>
         <cpn><i slot="right">哈哈哈</i></cpn>
        </div>
    <template id="cpn">
        <div>
            <slot name="left">左边</slot>
            <slot name="center">中间</slot>
            <slot name="right">右边</slot>
        </div>
    </template>
</body>
<script src='../js/vue.js'></script>
<script>
    let app = new Vue({
        el: '#app',
        data: {
             msg:'hello vue.js'
        },
        methods: {},
        components: {
            cpn: {
                template: '#cpn'
            }
        }
    })
</script>
</html>